Distributor API icon

Distributor API

(0 reviews)

Access and Authorization

resources/jira-logo-scaled-9bf634e0-fabf-424d-9c59-9d1d26703bec-f60c7266-4763-48fa-bdda-261b7f1f8674.png

Access

Request Access to the Distributor API

This section lists the steps required to request access to the SRAM Distributor API. This API provides product catalog and price list information from SRAM products.

The SRAM Distributor API is available in the SRAM API Portal located at https://api-portal.sram.com

Login to the Anypoint platform

Before you can request access to the SRAM Bike Dealer API, you will need a Mulesoft Anypoint account so we can grant access to the API. In the upper-right of the SRAM API Portal, there is a “login” link. Use this link to create your Mulesoft Anypoint account.

  • Create an account using the email address of your account owner for SRAM Connect (https://www.sramconnect.com) if you don’t already have one
  • Allow SRAM access to your profile on login

Select the Distributor API

From the SRAM API Portal main page, select the “Distributor API”. This will take you to the Distributor API page which includes documentation for the API including the endpoints, data types, as well as a mocking service for the API. (You are here now if you see this).

From the Distributor API page, request access to the API

In the upper-right of the Distributor API page, you can request access to the API

resources/RequestAccess-58685182-7b76-4ea7-afba-e832fc4e9030.png

Select the API Instance

From the “API Instance” drop-down, select the “Production – Automated” instance of the API

resources/SelectInstance-7d787fd2-287f-4103-b6ef-a6dc0dcc4ae0.png

Create a client application for the Distributor API

In the “Application” drop-down, select “Create a new application”

resources/Create%20New%20Client%20Application-6f06bf27-d068-4bb3-92e9-56ddb6dc36bb.png

Enter application details

This will be the application that SRAM will grant access to. You only need to provide a name and description.

  • Please include the name of your Organization in the Application name.

resources/CreateNewApplication-aa1c988f-13ce-4916-805b-c94f5aa89914.png

Select appropriate SLA tier

Select the SLA tier that is most appropriate for your API usage and click the “Request Access”]

resources/selectSLATier-171e68a4-17b1-4dd8-ba52-2c67b20e6f85.png

You will then see the confirmation of your request

resources/applicationConfirmation-fdbcbe4a-b3e6-4d4f-96c7-ad1e2d4916ae.png

Verification

Once requested, we will reach out to the email associated with the client application to verify that you are as requested. Once verified your application will be approved.

Confirmation Email

You will receive a confirmation email once the API access is approved. Follow the link in the email to view your API credentials

resources/confirmationEmail-b931306d-1ac2-4e29-b4f4-32a6816a5233.png

API credentials

From the link in the confirmation email, you can view your application details including the Client ID and Client Secret.

The Client ID and Client Secret are used to authenticate calls to the SRAM Bike Dealer API. These values are passed in custom HTTP headers named client_id and client_secret when you make any API call.

resources/clientCredentials-5555d326-4d97-4858-a9e8-b499c200e943.png

Testing the API

This section walks through one approach to test the SRAM Bike Dealer API using Postman(https://www.postman.com/)

  • Postman is not required to test the SRAM Distributor API - you can test the API using any REST client.

Download and extract the RAML specification

From the SRAM API Portal, download the Distributor API as RAML

resources/downloadRaml-380ae041-7e4f-4fa0-9855-cea6fd90e958.png

Create a collection from the RAML specification

Extract the files from the downloaded RAML ZIP file, and locate the exp-distributor-api.raml file

  • The ZIP file is located in your browser’s “downloads” folder

resources/extractRaml-746e95f2-9a3c-4dd2-aa05-a546dafa888b.png

In Postman, from the Collections view, select Import

resources/postmanImport-9ee56262-9ceb-4463-ac66-fa56fe29f149.png

From the Import dialog, drag and drop (or browse for) for the exp-distributor-api.raml file. The “Import” dialog will show that it will create a collection from the RAML specification.

  • The import will say Distributor API not 'Bike Dealer API'

resources/importConfirmation-78127746-10eb-4b93-aa75-4092234fe005.png

Select the Import button to create the collection.

resources/importComplete-4138d6df-3b9f-46c8-8c34-08012a81791e.png

You now have a collection with requests for the endpoints in the SRAM Distributor API

resources/distributorCollection-77fa6b42-be06-457d-bebd-9d5ddad35181.png


Reviews